//
//  Utility.m
//  DrawCircle
//
//  Created by Nguyen Tan Loc on 5/14/13.
//  Copyright (c) 2013 Nguyen Tan Loc. All rights reserved.
//

#import "Utility.h"

@implementation Utility

static Utility *m_Instance = nil;

+(Utility *) getInstance
{
    if (m_Instance == nil)
        m_Instance = [[Utility alloc] init];
    return m_Instance;
}

-(id) init
{
    if (self = [super init])
    {

    }
    return self;
}

-(float) vectorToAngle:(CGPoint)vector
{
    return atan2f(vector.x, vector.y) * 180.0f / kmPI;
}

-(float) vectorToRadian:(CGPoint)vector
{
    return atan2f(vector.x, vector.y);
}

@end

